<template>
	<Card style="width: 100%" v-show="type == 'detail'">
		<p slot="title">{{ rowDetail.templateName }}</p>
		<a href="#" slot="extra" @click="goBack">
			<Icon type="ios-loop-strong"></Icon>
			返回
		</a>
    <!-- {{rowDetail.templateType}}--{{rowDetail}} -->
		<template v-if="type == 'warning'">
			<!-- 工单 -->
			<template v-if="rowDetail.templateType == 1">
				<div>
					<p>{{ rowDetail.planContent }}</p>
					<p></p>
					<p></p>
				</div>
			</template>
			<!-- 设备维修 -->
			<template v-else-if="rowDetail.templateType == 2">
        <div class="card-content">
					<h3>{{ rowDetail.planContent }}</h3>
					<p>设备编号：{{rowDetail.deviceNo}}</p>
          <p>设备名称：{{rowDetail.deviceName}}</p>
					<p>提报人：{{rowDetail.reportMan}}</p>
					<p>提报时间：{{rowDetail.reportTime}}</p>
					<!-- <p>提报时间：{{rowDetail.deviceNo}}</p> -->
				</div>
			</template>
			<!-- 设备保养 设备点检-->
			<template v-else-if="[3,4].indexOf(rowDetail.templateType)!==-1">
        <div class="card-content">
					<h3>{{ rowDetail.planContent }}</h3>
					<p>设备编号：{{rowDetail.deviceNo}}</p>
          <p>设备名称：{{rowDetail.deviceName}}</p>
					<p>计划创建时间：{{rowDetail.planCreateTime}}</p>
					<p>计划开始时间：{{rowDetail.planStartTime}}</p>
				</div>
			</template>
			<!-- 模具维修 -->
			<template v-else-if="rowDetail.templateType == 5">
        <div class="card-content">
					<h3>{{ rowDetail.planContent }}</h3>
					<p>模具编号：{{rowDetail.moldCode}}</p>
          <p>模具名称：{{rowDetail.moldName}}</p>
					<p>提报人：{{rowDetail.reportMan}}</p>
					<p>提报时间：{{rowDetail.reportTime}}</p>
				</div>
			</template>
			<!-- 模具保养 模具点检 -->
			<template v-else-if="[6,7].indexOf(rowDetail.templateType)!==-1">
        <div class="card-content">
					<h3>{{ rowDetail.planContent }}</h3>
					<p>模具编号：{{rowDetail.moldCode}}</p>
					<p v-if="rowDetail.templateType==6">生产模次：{{rowDetail.productionMode}}</p>
          <p v-if="rowDetail.templateType==7">模具名称：{{rowDetail.moldName}}</p>
					<p>计划创建时间：{{rowDetail.planCreateTime}}</p>
					<p>计划开始时间：{{rowDetail.planStartTime}}</p>
				</div>
			</template>
		</template>
		<template v-if="type == 'notice'">
      <div>
					<p>{{ rowDetail.planContent }}</p>
				</div>
		</template>
	</Card>
</template>

<script>
export default {
	props: {
		rowDetail: {
			type: {},
		},
		type: {
			type:String,
		},
	},
	data() {
		return {};
	},
	created() {},
	mounted() {},
	methods: {
		goBack() {
			this.$emit('goBack');
		},
	},
};
</script>
<style scoped lang="scss">
.card-content{
  :nth-child(1){
    margin-bottom: 10px;
  }
}
.ivu-card-body{
  // padding:0 10px !important;
  // background-color:red !important;
}

</style>
